import { createSlice } from "@reduxjs/toolkit";

interface TabbarType {
  active: number;
}

const initialState: TabbarType = {
  active: 0,
};

const tabbarSlice = createSlice({
  name: "tabbar",
  initialState,
  reducers: {
    setActive(state, action) {
      state.active = action.payload;
    },
  },
});
export default tabbarSlice.reducer;
export const { setActive } = tabbarSlice.actions;
